package com.syezon.wifikey.speed;

import java.util.List;

public class SpeedTestStepInfo {

    public static final int STEP_TYPE_INIT = -1;
    public static final int STEP_TYPE_START_PING_TEST = 1;
    public static final int STEP_TYPE_PING_RESULT = 2;
    public static final int STEP_TYPE_LOSE_RATE_RESULT = 11;
    public static final int STEP_TYPE_START_SPEED = 3;
    public static final int STEP_TYPE_CURRENT_SPEED = 4;
    public static final int STEP_TYPE_AVERAGE_SPEED = 6;
    public static final int STEP_TYPE_START_UPLOAD = 7;
    public static final int STEP_TYPE_CURRENT_UPLOAD = 8;
    public static final int STEP_TYPE_AVERAGE_UPLOAD = 9;
    public static final int STEP_TYPE_CANCEL = 10;
    public static final int STEP_TYPE_ERROR = 12;
    public static final int STEP_TYPE_START_LOSE_RATE_RESULT = 13;

    private int stepType = STEP_TYPE_INIT;

    private PingData pingData;
    private double downloadSpeed;
    private long downloadDataUse;
    private double uploadSpeed;
    private long uploadDataUse;
    private double loseRate;
    private List<Double> downloadSampleList;
    private List<Double> uploadSampleList;

    public int getStepType() {
        return stepType;
    }

    public void setStepType(int stepType) {
        this.stepType = stepType;
    }

    public PingData getPingData() {
        return pingData;
    }

    public void setPingData(PingData pingData) {
        this.pingData = pingData;
    }

    public double getDownloadSpeed() {
        return downloadSpeed;
    }

    public double getLoseRate() {
        return loseRate;
    }

    public void setLoseRate(double loseRate) {
        this.loseRate = loseRate;
    }

    public void setDownloadSpeed(double downloadSpeed) {
        this.downloadSpeed = downloadSpeed;
    }

    public double getUploadSpeed() {
        return uploadSpeed;
    }

    public void setUploadSpeed(double uploadSpeed) {
        this.uploadSpeed = uploadSpeed;
    }

    public List<Double> getDownloadSampleList() {
        return downloadSampleList;
    }

    public void setDownloadSampleList(List<Double> downloadSampleList) {
        this.downloadSampleList = downloadSampleList;
    }

    public List<Double> getUploadSampleList() {
        return uploadSampleList;
    }

    public void setUploadSampleList(List<Double> uploadSampleList) {
        this.uploadSampleList = uploadSampleList;
    }

    public long getDownloadDataUse() {
        return downloadDataUse;
    }

    public void setDownloadDataUse(long downloadDataUse) {
        this.downloadDataUse = downloadDataUse;
    }

    public long getUploadDataUse() {
        return uploadDataUse;
    }

    public void setUploadDataUse(long uploadDataUse) {
        this.uploadDataUse = uploadDataUse;
    }

    public static class PingData {
        public final double ping;
        public final double jetter;
        public final double lose;

        public PingData(double ping, double jetter, double lose) {
            this.ping = ping;
            this.jetter = jetter;
            this.lose = lose;
        }
    }
}
